﻿<catel:DataWindow x:Class="Orchestra.Views.AboutView"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
				  xmlns:catel="http://catel.codeplex.com"
                  Width="600" Height="500" SizeToContent="Manual">

    <!-- Resources -->
    <catel:DataWindow.Resources>
        <catel:BooleanToHidingVisibilityConverter x:Key="BooleanToHidingVisibilityConverter" />
    </catel:DataWindow.Resources>

    <!-- Content -->
    <catel:StackGrid Margin="-6">
        <catel:StackGrid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </catel:StackGrid.RowDefinitions>

        <catel:StackGrid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </catel:StackGrid.ColumnDefinitions>

        <Grid catel:StackGrid.ColumnSpan="2">
            <Image HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" Source="/Orchestra.Shell;component/Resources/Images/About.png" Stretch="None" />
        </Grid>

        <Label catel:StackGrid.ColumnSpan="2">
            <TextBlock TextWrapping="Wrap">
                Orchestra is a composable shell built on top of Catel.
            </TextBlock>
        </Label>

        <TextBlock catel:StackGrid.ColumnSpan="2" Margin="6,0,0,0">
            Loaded modules:
        </TextBlock>

        <ListView x:Name="modulesListView" ItemsSource="{Binding Modules}" catel:StackGrid.ColumnSpan="2" >
            <ListView.View>
                <GridView>
                    <GridViewColumn Width="120" Header="Name">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Label Content="{Binding ModuleName}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Width="100" Header="State">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Label Content="{Binding State}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Width="100" Header="License">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <catel:LinkLabel Content="view license..." Command="{Binding ElementName=modulesListView, Path=DataContext.ViewLicense}"
                                                 CommandParameter="{Binding}" Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToHidingVisibilityConverter}}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>

        <TextBlock catel:StackGrid.ColumnSpan="2" Margin="6,0,0,0">
            Used libraries:
        </TextBlock>

        <WrapPanel catel:StackGrid.ColumnSpan="2">
            <catel:LinkLabel Content="AvalonDock" Url="http://avalondock.codeplex.com" ClickBehavior="OpenUrlInBrowser" />
            <catel:LinkLabel Content="Catel" Url="http://catel.codeplex.com/" ClickBehavior="OpenUrlInBrowser" />
            <catel:LinkLabel Content="FluentRibbon" Url="http://fluent.codeplex.com" ClickBehavior="OpenUrlInBrowser" />
            <!--<catel:LinkLabel Content="OxyPlot" Url="http://oxyplot.codeplex.com" ClickBehavior="OpenUrlInBrowser" />-->
        </WrapPanel>

        <Label>
            <TextBlock TextWrapping="Wrap">
                Orchestra is released as open source (MS-PL license), so you are free to use it in commercial applications
            </TextBlock>
        </Label>

        <Button HorizontalAlignment="Right" Margin="8" Content="Close" Command="{Binding CloseCommand}" Width="75" />
    </catel:StackGrid>
</catel:DataWindow>
